package org.jeecg.modules.operations.assistant.xcbd.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @Description: 销售合同
 * @Author: jeecg-boot
 * @Date:   2024-12-21
 * @Version: V1.0
 */
@Data
@TableName("xcbd_sales_contract")
@ApiModel(value="xcbd_sales_contract对象", description="销售合同")
public class XcbdSalesContract implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private java.lang.String id;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private java.util.Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private java.util.Date updateTime;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private java.lang.String sysOrgCode;
	/**合同编号*/
    @Excel(name = "合同编号", width = 15)
    @ApiModelProperty(value = "合同编号")
    private java.lang.String ontractNumber;
	/**合同名称*/
    @Excel(name = "合同名称", width = 15)
    @ApiModelProperty(value = "合同名称")
    private java.lang.String contractName;
	/**客户名称*/
    @Excel(name = "客户名称", width = 15)
    @ApiModelProperty(value = "客户名称")
    private java.lang.String customerName;
	/**行政区域*/
    @Excel(name = "行政区域", width = 15,exportConvert=true,importConvert = true )
    @ApiModelProperty(value = "行政区域")
    private java.lang.String homeAddress;

    public String convertisHomeAddress() {
        return SpringContextUtils.getBean(ProvinceCityArea.class).getText(homeAddress);
    }

    public void convertsetHomeAddress(String text) {
        this.homeAddress = SpringContextUtils.getBean(ProvinceCityArea.class).getCode(text);
    }
	/**详细地址*/
    @Excel(name = "详细地址", width = 15)
    @ApiModelProperty(value = "详细地址")
    private java.lang.String address;
	/**联系人*/
    @Excel(name = "联系人", width = 15)
    @ApiModelProperty(value = "联系人")
    private java.lang.String contacts;
	/**联系电话*/
    @Excel(name = "联系电话", width = 15)
    @ApiModelProperty(value = "联系电话")
    private java.lang.String telephone;
	/**签约时间*/
    @Excel(name = "签约时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "签约时间")
    private java.util.Date signingTime;
	/**合同状态*/
    @Excel(name = "合同状态", width = 15, dicCode = "contract_status")
    @Dict(dicCode = "contract_status")
    @ApiModelProperty(value = "合同状态")
    private java.lang.Integer contractStatus;
	/**合同生效时间*/
    @Excel(name = "合同生效时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "合同生效时间")
    private java.util.Date effectiveTime;
	/**合同终止时间*/
    @Excel(name = "合同终止时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "合同终止时间")
    private java.util.Date endTime;
	/**合同金额*/
    @Excel(name = "合同金额", width = 15)
    @ApiModelProperty(value = "合同金额")
    private java.math.BigDecimal contractAmount;
	/**待回款金额*/
    @Excel(name = "待回款金额", width = 15)
    @ApiModelProperty(value = "待回款金额")
    private java.math.BigDecimal collectionAmount;
	/**合同描述*/
    @Excel(name = "合同描述", width = 15)
    @ApiModelProperty(value = "合同描述")
    private java.lang.String contractDescription;
	/**合同附件*/
    @Excel(name = "合同附件", width = 15)
    @ApiModelProperty(value = "合同附件")
    private java.lang.String attachment;
	/**所属销售*/
    @Excel(name = "所属销售", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @ApiModelProperty(value = "所属销售")
    private java.lang.String belongingSales;
	/**流程发起人*/
    @Excel(name = "流程发起人", width = 15)
    @ApiModelProperty(value = "流程发起人")
    private java.lang.String processInitiator;
	/**流程状态*/
    @Excel(name = "流程状态", width = 15, dicCode = "process_status")
    @Dict(dicCode = "process_status")
    @ApiModelProperty(value = "流程状态")
    private java.lang.String processStatus;
	/**流程进展*/
    @Excel(name = "流程进展", width = 15)
    @ApiModelProperty(value = "流程进展")
    private java.lang.String processProgress;
	/**流程启动时间*/
    @Excel(name = "流程启动时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "流程启动时间")
    private java.util.Date processStartTime;
	/**流程结束时间*/
    @Excel(name = "流程结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "流程结束时间")
    private java.util.Date processEndTime;
    /**分期*/
    @Excel(name = "分期", width = 15, dicCode = "by_stages")
    @Dict(dicCode = "by_stages")
    @ApiModelProperty(value = "分期")
    private java.lang.String byStages;
    /**合同期限*/
    @Excel(name = "合同期限", width = 15, dicCode = "contract_period")
    @Dict(dicCode = "contract_period")
    @ApiModelProperty(value = "合同期限")
    private java.lang.String contractPeriod;
}
